#include "StreamReader.h"

StreamReader::StreamReader(std::istream *bs)
{
	this ->bs = bs;
}

StreamReader::~StreamReader(void)
{
}

BYTE StreamReader::ReadByte()
{
	BYTE val;
	bs ->read((char*)&val, sizeof(val));
	return val;
}

char StreamReader::ReadChar()
{
	char val;
	bs ->read((char*)&val, sizeof(val));
	return val;
}

int StreamReader::ReadInt()
{
	int val;
	bs ->read((char*)&val, sizeof(val));
	return val;
}

float StreamReader::ReadFloat()
{
	float val;
	bs ->read((char*)&val, sizeof(val));
	return val;
}

DWORD StreamReader::ReadDword()
{
	DWORD val;
	bs ->read((char*)&val, sizeof(val));
	return val;
}

BYTE *StreamReader::ReadBuffer(int size)
{
	BYTE *val = new BYTE[size];
	bs ->read((char*)val, size);
	return val;
}
